<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: ActiveScaffold::Helpers::FormColumns</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">ActiveScaffold::Helpers::FormColumns</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge_rb.html">
                vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge.rb
                </a>
        <br />
                <a href="../../../files/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/form_ui_rb.html">
                vendor/plugins/active_scaffold/lib/bridges/file_column/lib/form_ui.rb
                </a>
        <br />
                <a href="../../../files/vendor/plugins/active_scaffold/lib/helpers/form_column_helpers_rb.html">
                vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
<a href="../Helpers.html">Helpers</a> that assist with the rendering of a
Form Column
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000254">active_scaffold_input_boolean</a>&nbsp;&nbsp;
      <a href="#M000238">active_scaffold_input_calendar_date_select</a>&nbsp;&nbsp;
      <a href="#M000248">active_scaffold_input_checkbox</a>&nbsp;&nbsp;
      <a href="#M000249">active_scaffold_input_country</a>&nbsp;&nbsp;
      <a href="#M000239">active_scaffold_input_file_column</a>&nbsp;&nbsp;
      <a href="#M000240">active_scaffold_input_for</a>&nbsp;&nbsp;
      <a href="#M000243">active_scaffold_input_options</a>&nbsp;&nbsp;
      <a href="#M000250">active_scaffold_input_password</a>&nbsp;&nbsp;
      <a href="#M000245">active_scaffold_input_plural_association</a>&nbsp;&nbsp;
      <a href="#M000247">active_scaffold_input_record_select</a>&nbsp;&nbsp;
      <a href="#M000246">active_scaffold_input_select</a>&nbsp;&nbsp;
      <a href="#M000244">active_scaffold_input_singular_association</a>&nbsp;&nbsp;
      <a href="#M000242">active_scaffold_input_text_options</a>&nbsp;&nbsp;
      <a href="#M000251">active_scaffold_input_textarea</a>&nbsp;&nbsp;
      <a href="#M000252">active_scaffold_input_usa_state</a>&nbsp;&nbsp;
      <a href="#M000253">active_scaffold_input_virtual</a>&nbsp;&nbsp;
      <a href="#M000262">column_renders_as</a>&nbsp;&nbsp;
      <a href="#M000241">form_column</a>&nbsp;&nbsp;
      <a href="#M000261">form_partial_for_column</a>&nbsp;&nbsp;
      <a href="#M000264">is_subform?</a>&nbsp;&nbsp;
      <a href="#M000263">is_subsection?</a>&nbsp;&nbsp;
      <a href="#M000258">override_form_field</a>&nbsp;&nbsp;
      <a href="#M000257">override_form_field?</a>&nbsp;&nbsp;
      <a href="#M000256">override_form_field_partial</a>&nbsp;&nbsp;
      <a href="#M000255">override_form_field_partial?</a>&nbsp;&nbsp;
      <a href="#M000260">override_input</a>&nbsp;&nbsp;
      <a href="#M000259">override_input?</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000254" class="method-detail">
        <a name="M000254"></a>

        <div class="method-heading">
          <a href="#M000254" class="method-signature">
          <span class="method-name">active_scaffold_input_boolean</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Column.type-based inputs
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000254-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000254-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 173</span>
173:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_boolean</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
174:         <span class="ruby-identifier">select_options</span> = []
175:         <span class="ruby-identifier">select_options</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">as_</span>(<span class="ruby-value str">'- select -'</span>), <span class="ruby-keyword kw">nil</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">column</span>.<span class="ruby-identifier">null</span>
176:         <span class="ruby-identifier">select_options</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">as_</span>(<span class="ruby-value str">'True'</span>), <span class="ruby-keyword kw">true</span>]
177:         <span class="ruby-identifier">select_options</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">as_</span>(<span class="ruby-value str">'False'</span>), <span class="ruby-keyword kw">false</span>]
178: 
179:         <span class="ruby-identifier">select_tag</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:name</span>], <span class="ruby-identifier">options_for_select</span>(<span class="ruby-identifier">select_options</span>, <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>)))
180:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000238" class="method-detail">
        <a name="M000238"></a>

        <div class="method-heading">
          <a href="#M000238" class="method-signature">
          <span class="method-name">active_scaffold_input_calendar_date_select</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000238-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000238-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge.rb, line 27</span>
27:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_calendar_date_select</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
28:         <span class="ruby-identifier">calendar_date_select</span>(<span class="ruby-value str">&quot;record&quot;</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
29:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000248" class="method-detail">
        <a name="M000248"></a>

        <div class="method-heading">
          <a href="#M000248" class="method-signature">
          <span class="method-name">active_scaffold_input_checkbox</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000248-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000248-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 137</span>
137:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_checkbox</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
138:         <span class="ruby-identifier">check_box</span>(<span class="ruby-identifier">:record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
139:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000249" class="method-detail">
        <a name="M000249"></a>

        <div class="method-heading">
          <a href="#M000249" class="method-signature">
          <span class="method-name">active_scaffold_input_country</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000249-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000249-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 141</span>
141:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_country</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
142:         <span class="ruby-identifier">priority</span> = [<span class="ruby-value str">&quot;United States&quot;</span>]
143:         <span class="ruby-identifier">select_options</span> = {<span class="ruby-identifier">:prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">as_</span>(<span class="ruby-value str">'- select -'</span>)}
144:         <span class="ruby-identifier">select_options</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">options</span>)
145:         <span class="ruby-identifier">country_select</span>(<span class="ruby-identifier">:record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:priority</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">priority</span>, <span class="ruby-identifier">select_options</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>)
146:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000239" class="method-detail">
        <a name="M000239"></a>

        <div class="method-heading">
          <a href="#M000239" class="method-signature">
          <span class="method-name">active_scaffold_input_file_column</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000239-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000239-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/bridges/file_column/lib/form_ui.rb, line 5</span>
 5:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_file_column</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
 6:         <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>) 
 7:           <span class="ruby-comment cmt"># we already have a value?  display the form for deletion.</span>
 8:           <span class="ruby-identifier">content_tag</span>(
 9:             <span class="ruby-identifier">:div</span>, 
10:             <span class="ruby-identifier">content_tag</span>(
11:               <span class="ruby-identifier">:div</span>, 
12:               <span class="ruby-identifier">get_column_value</span>(<span class="ruby-ivar">@record</span>, <span class="ruby-identifier">column</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">&quot; &quot;</span> <span class="ruby-operator">+</span>
13:               <span class="ruby-identifier">hidden_field</span>(<span class="ruby-identifier">:record</span>, <span class="ruby-node">&quot;delete_#{column.name}&quot;</span>, <span class="ruby-identifier">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;false&quot;</span>) <span class="ruby-operator">+</span>
14:               <span class="ruby-value str">&quot; | &quot;</span> <span class="ruby-operator">+</span>
15:               <span class="ruby-identifier">link_to_function</span>(<span class="ruby-identifier">as_</span>(<span class="ruby-value str">&quot;Remove file&quot;</span>), <span class="ruby-value str">&quot;$(this).previous().value='true'; p=$(this).up(); p.hide(); p.next().show();&quot;</span>),
16:               {}
17:             ) <span class="ruby-operator">+</span>
18:             <span class="ruby-identifier">content_tag</span>(
19:               <span class="ruby-identifier">:div</span>,
20:               <span class="ruby-identifier">file_column_field</span>(<span class="ruby-value str">&quot;record&quot;</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>),
21:               <span class="ruby-identifier">:style</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;display: none&quot;</span>
22:             ),
23:             {}
24:           )
25:         <span class="ruby-keyword kw">else</span>
26:           <span class="ruby-comment cmt"># no, just display the file_column_field</span>
27:           <span class="ruby-identifier">file_column_field</span>(<span class="ruby-value str">&quot;record&quot;</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
28:         <span class="ruby-keyword kw">end</span>
29:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000240" class="method-detail">
        <a name="M000240"></a>

        <div class="method-heading">
          <a href="#M000240" class="method-signature">
          <span class="method-name">active_scaffold_input_for</span><span class="method-args">(column, scope = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method decides which input to use for the given column. It does not do
any rendering. It only decides which method is responsible for rendering.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000240-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000240-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 7</span>
 7:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_for</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">scope</span> = <span class="ruby-keyword kw">nil</span>)
 8:         <span class="ruby-identifier">options</span> = <span class="ruby-identifier">active_scaffold_input_options</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">scope</span>)
 9: 
10:         <span class="ruby-comment cmt"># first, check if the dev has created an override for this specific field</span>
11:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">override_form_field?</span>(<span class="ruby-identifier">column</span>)
12:           <span class="ruby-identifier">send</span>(<span class="ruby-identifier">override_form_field</span>(<span class="ruby-identifier">column</span>), <span class="ruby-ivar">@record</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:name</span>])
13: 
14:         <span class="ruby-comment cmt"># second, check if the dev has specified a valid form_ui for this column</span>
15:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">form_ui</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">override_input?</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">form_ui</span>)
16:           <span class="ruby-identifier">send</span>(<span class="ruby-identifier">override_input</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">form_ui</span>), <span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
17: 
18:         <span class="ruby-comment cmt"># fallback: we get to make the decision</span>
19:         <span class="ruby-keyword kw">else</span>
20:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>
21:             <span class="ruby-comment cmt"># if we get here, it's because the column has a form_ui but not one ActiveScaffold knows about.</span>
22:             <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Unknown form_ui `#{column.form_ui}' for column `#{column.name}'&quot;</span>
23:           <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">virtual?</span>
24:             <span class="ruby-identifier">active_scaffold_input_virtual</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
25: 
26:           <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># regular model attribute column</span>
27:             <span class="ruby-comment cmt"># if we (or someone else) have created a custom render option for the column type, use that</span>
28:             <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">override_input?</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">column</span>.<span class="ruby-identifier">type</span>)
29:               <span class="ruby-identifier">send</span>(<span class="ruby-identifier">override_input</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">column</span>.<span class="ruby-identifier">type</span>), <span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
30:             <span class="ruby-comment cmt"># final ultimate fallback: use rails' generic input method</span>
31:             <span class="ruby-keyword kw">else</span>
32:               <span class="ruby-comment cmt"># for textual fields we pass different options</span>
33:               <span class="ruby-identifier">text_types</span> = [<span class="ruby-identifier">:text</span>, <span class="ruby-identifier">:string</span>, <span class="ruby-identifier">:integer</span>, <span class="ruby-identifier">:float</span>, <span class="ruby-identifier">:decimal</span>]
34:               <span class="ruby-identifier">options</span> = <span class="ruby-identifier">active_scaffold_input_text_options</span>(<span class="ruby-identifier">options</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text_types</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">column</span>.<span class="ruby-identifier">type</span>)
35: 
36:               <span class="ruby-identifier">input</span>(<span class="ruby-identifier">:record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
37:             <span class="ruby-keyword kw">end</span>
38:           <span class="ruby-keyword kw">end</span>
39:         <span class="ruby-keyword kw">end</span>
40:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000243" class="method-detail">
        <a name="M000243"></a>

        <div class="method-heading">
          <a href="#M000243" class="method-signature">
          <span class="method-name">active_scaffold_input_options</span><span class="method-args">(column, scope = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
the standard active scaffold options used for class, name and scope
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000243-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000243-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 53</span>
53:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_options</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">scope</span> = <span class="ruby-keyword kw">nil</span>)
54:         <span class="ruby-identifier">name</span> = <span class="ruby-identifier">scope</span> <span class="ruby-value">? </span><span class="ruby-node">&quot;record#{scope}[#{column.name}]&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-node">&quot;record[#{column.name}]&quot;</span>
55:         <span class="ruby-identifier">options</span> = { <span class="ruby-identifier">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">:class</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;#{column.name}-input&quot;</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-node">&quot;record_#{column.name}_#{params[:eid] || params[:id]}&quot;</span>}
56:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000250" class="method-detail">
        <a name="M000250"></a>

        <div class="method-heading">
          <a href="#M000250" class="method-signature">
          <span class="method-name">active_scaffold_input_password</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000250-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000250-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 148</span>
148:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_password</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
149:         <span class="ruby-identifier">password_field</span> <span class="ruby-identifier">:record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">active_scaffold_input_text_options</span>(<span class="ruby-identifier">options</span>)
150:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000245" class="method-detail">
        <a name="M000245"></a>

        <div class="method-heading">
          <a href="#M000245" class="method-signature">
          <span class="method-name">active_scaffold_input_plural_association</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000245-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000245-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 75</span>
75:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_plural_association</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
76:         <span class="ruby-identifier">associated_options</span> = <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">r</span>.<span class="ruby-identifier">to_label</span>, <span class="ruby-identifier">r</span>.<span class="ruby-identifier">id</span>]}
77:         <span class="ruby-identifier">select_options</span> = <span class="ruby-identifier">associated_options</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">options_for_association</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>)
78:         <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'no options'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">select_options</span>.<span class="ruby-identifier">empty?</span>
79: 
80:         <span class="ruby-identifier">html</span> = <span class="ruby-value str">'&lt;ul class=&quot;checkbox-list&quot;&gt;'</span>
81: 
82:         <span class="ruby-identifier">associated_ids</span> = <span class="ruby-identifier">associated_options</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>[<span class="ruby-value">1</span>]}
83:         <span class="ruby-identifier">select_options</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">option</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
84:           <span class="ruby-identifier">label</span>, <span class="ruby-identifier">id</span> = <span class="ruby-identifier">option</span>
85:           <span class="ruby-identifier">this_name</span> = <span class="ruby-node">&quot;#{options[:name]}[#{i}][id]&quot;</span>
86:           <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;li&gt;&quot;</span>
87:           <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">check_box_tag</span>(<span class="ruby-identifier">this_name</span>, <span class="ruby-identifier">id</span>, <span class="ruby-identifier">associated_ids</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">id</span>))
88:           <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;&lt;label for='#{this_name}'&gt;&quot;</span>
89:           <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">label</span>
90:           <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/label&gt;&quot;</span>
91:           <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/li&gt;&quot;</span>
92:         <span class="ruby-keyword kw">end</span>
93: 
94:         <span class="ruby-identifier">html</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'&lt;/ul&gt;'</span>
95:         <span class="ruby-identifier">html</span>
96:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000247" class="method-detail">
        <a name="M000247"></a>

        <div class="method-heading">
          <a href="#M000247" class="method-signature">
          <span class="method-name">active_scaffold_input_record_select</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
only works for singular associations requires RecordSelect plugin to be
installed and configured. &#8230; maybe this should be provided in a
bridge?
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000247-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000247-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 111</span>
111:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_record_select</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
112:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;record_select can only work against associations (and #{column.name} is not).  A common mistake is to specify the foreign key field (like :user_id), instead of the association (:user).&quot;</span>
113:         <span class="ruby-identifier">remote_controller</span> = <span class="ruby-identifier">active_scaffold_controller_for</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">klass</span>).<span class="ruby-identifier">controller_path</span>
114: 
115:         <span class="ruby-comment cmt"># if the opposite association is a :belongs_to, then only show records that have not been associated yet</span>
116:         <span class="ruby-identifier">params</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span> <span class="ruby-keyword kw">and</span> [<span class="ruby-identifier">:has_one</span>, <span class="ruby-identifier">:has_many</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">macro</span>)
117:           {<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">primary_key_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>}
118:         <span class="ruby-keyword kw">else</span>
119:           {}
120:         <span class="ruby-keyword kw">end</span>
121: 
122:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">singular_association?</span>
123:           <span class="ruby-identifier">record_select_field</span>(
124:             <span class="ruby-node">&quot;#{options[:name]}&quot;</span>,
125:             <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">new</span>,
126:             {<span class="ruby-identifier">:controller</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">remote_controller</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:id</span>], <span class="ruby-identifier">:params</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">:parent_id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">:parent_model</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">class</span>)}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">active_scaffold_input_text_options</span>).<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>)
127:           )
128:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">plural_association?</span>
129:           <span class="ruby-identifier">record_multi_select_field</span>(
130:             <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:name</span>],
131:             <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>),
132:             {<span class="ruby-identifier">:controller</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">remote_controller</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:id</span>], <span class="ruby-identifier">:params</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">:parent_id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">id</span>, <span class="ruby-identifier">:parent_model</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">class</span>)}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">active_scaffold_input_text_options</span>).<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>)
133:           )
134:         <span class="ruby-keyword kw">end</span>
135:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000246" class="method-detail">
        <a name="M000246"></a>

        <div class="method-heading">
          <a href="#M000246" class="method-signature">
          <span class="method-name">active_scaffold_input_select</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000246-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000246-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 98</span>
 98:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_select</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
 99:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">singular_association?</span>
100:           <span class="ruby-identifier">active_scaffold_input_singular_association</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
101:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">plural_association?</span>
102:           <span class="ruby-identifier">active_scaffold_input_plural_association</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
103:         <span class="ruby-keyword kw">else</span>
104:           <span class="ruby-identifier">select</span>(<span class="ruby-identifier">:record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>, { <span class="ruby-identifier">:selected</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>) }, <span class="ruby-identifier">options</span>)
105:         <span class="ruby-keyword kw">end</span>
106:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000244" class="method-detail">
        <a name="M000244"></a>

        <div class="method-heading">
          <a href="#M000244" class="method-signature">
          <span class="method-name">active_scaffold_input_singular_association</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Form input methods
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000244-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000244-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 62</span>
62:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_singular_association</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
63:         <span class="ruby-identifier">associated</span> = <span class="ruby-ivar">@record</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">name</span>)
64: 
65:         <span class="ruby-identifier">select_options</span> = [[<span class="ruby-identifier">as_</span>(<span class="ruby-value str">'- select -'</span>),<span class="ruby-keyword kw">nil</span>]]
66:         <span class="ruby-identifier">select_options</span> <span class="ruby-operator">+=</span> [[ <span class="ruby-identifier">associated</span>.<span class="ruby-identifier">to_label</span>, <span class="ruby-identifier">associated</span>.<span class="ruby-identifier">id</span> ]] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">associated</span>.<span class="ruby-identifier">nil?</span>
67:         <span class="ruby-identifier">select_options</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">options_for_association</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>)
68: 
69:         <span class="ruby-identifier">selected</span> = <span class="ruby-identifier">associated</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">associated</span>.<span class="ruby-identifier">id</span>
70: 
71:         <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:name</span>] <span class="ruby-operator">+=</span> <span class="ruby-value str">'[id]'</span>
72:         <span class="ruby-identifier">select</span>(<span class="ruby-identifier">:record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">select_options</span>.<span class="ruby-identifier">uniq</span>, { <span class="ruby-identifier">:selected</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">selected</span> }, <span class="ruby-identifier">options</span>)
73:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000242" class="method-detail">
        <a name="M000242"></a>

        <div class="method-heading">
          <a href="#M000242" class="method-signature">
          <span class="method-name">active_scaffold_input_text_options</span><span class="method-args">(options = {})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
the standard active scaffold options used for textual inputs
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000242-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000242-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 45</span>
45:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_text_options</span>(<span class="ruby-identifier">options</span> = {})
46:         <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:autocomplete</span>] = <span class="ruby-value str">'off'</span>
47:         <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:size</span>] = <span class="ruby-value">20</span>
48:         <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:class</span>] = <span class="ruby-node">&quot;#{options[:class]} text-input&quot;</span>.<span class="ruby-identifier">strip</span>
49:         <span class="ruby-identifier">options</span>
50:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000251" class="method-detail">
        <a name="M000251"></a>

        <div class="method-heading">
          <a href="#M000251" class="method-signature">
          <span class="method-name">active_scaffold_input_textarea</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000251-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000251-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 152</span>
152:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_textarea</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
153:         <span class="ruby-identifier">text_area</span>(<span class="ruby-identifier">:record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">:cols</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:cols</span>], <span class="ruby-identifier">:rows</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:rows</span>]))
154:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000252" class="method-detail">
        <a name="M000252"></a>

        <div class="method-heading">
          <a href="#M000252" class="method-signature">
          <span class="method-name">active_scaffold_input_usa_state</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000252-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000252-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 156</span>
156:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_usa_state</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
157:         <span class="ruby-identifier">select_options</span> = {<span class="ruby-identifier">:prompt</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">as_</span>(<span class="ruby-value str">'- select -'</span>)}
158:         <span class="ruby-identifier">select_options</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">options</span>)
159:         <span class="ruby-identifier">select_options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:size</span>)
160:         <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:prompt</span>)
161:         <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:priority</span>)
162:         <span class="ruby-identifier">usa_state_select</span>(<span class="ruby-identifier">:record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:priority</span>], <span class="ruby-identifier">select_options</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">options</span>))
163:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000253" class="method-detail">
        <a name="M000253"></a>

        <div class="method-heading">
          <a href="#M000253" class="method-signature">
          <span class="method-name">active_scaffold_input_virtual</span><span class="method-args">(column, options)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000253-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000253-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 165</span>
165:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active_scaffold_input_virtual</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">options</span>)
166:         <span class="ruby-identifier">text_field</span> <span class="ruby-identifier">:record</span>, <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">active_scaffold_input_text_options</span>(<span class="ruby-identifier">options</span>)
167:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000262" class="method-detail">
        <a name="M000262"></a>

        <div class="method-heading">
          <a href="#M000262" class="method-signature">
          <span class="method-name">column_renders_as</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Macro-level rendering decisions for columns
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000262-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000262-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 230</span>
230:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">column_renders_as</span>(<span class="ruby-identifier">column</span>)
231:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">DataStructures</span><span class="ruby-operator">::</span><span class="ruby-constant">ActionColumns</span>
232:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:subsection</span>
233:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">active_record_class</span>.<span class="ruby-identifier">locking_column</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
234:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:hidden</span>
235:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">form_ui</span> <span class="ruby-keyword kw">or</span> <span class="ruby-operator">!</span><span class="ruby-identifier">active_scaffold_config_for</span>(<span class="ruby-identifier">column</span>.<span class="ruby-identifier">association</span>.<span class="ruby-identifier">klass</span>).<span class="ruby-identifier">actions</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:subform</span>)
236:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:field</span>
237:         <span class="ruby-keyword kw">else</span>
238:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:subform</span>
239:         <span class="ruby-keyword kw">end</span>
240:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000241" class="method-detail">
        <a name="M000241"></a>

        <div class="method-heading">
          <span class="method-name">form_column</span><span class="method-args">(column, scope = nil)</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="FormColumns.html#M000240">active_scaffold_input_for</a>
</p>
        </div>
      </div>

      <div id="method-M000261" class="method-detail">
        <a name="M000261"></a>

        <div class="method-heading">
          <a href="#M000261" class="method-signature">
          <span class="method-name">form_partial_for_column</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000261-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000261-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 214</span>
214:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">form_partial_for_column</span>(<span class="ruby-identifier">column</span>)
215:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">override_form_field_partial?</span>(<span class="ruby-identifier">column</span>)
216:           <span class="ruby-identifier">override_form_field_partial</span>(<span class="ruby-identifier">column</span>)
217:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column_renders_as</span>(<span class="ruby-identifier">column</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">:field</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">override_form_field?</span>(<span class="ruby-identifier">column</span>)
218:           <span class="ruby-value str">&quot;form_attribute&quot;</span>
219:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column_renders_as</span>(<span class="ruby-identifier">column</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">:subform</span>
220:           <span class="ruby-value str">&quot;form_association&quot;</span>
221:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">column_renders_as</span>(<span class="ruby-identifier">column</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">:hidden</span>
222:           <span class="ruby-value str">&quot;form_hidden_attribute&quot;</span>
223:         <span class="ruby-keyword kw">end</span>
224:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000264" class="method-detail">
        <a name="M000264"></a>

        <div class="method-heading">
          <a href="#M000264" class="method-signature">
          <span class="method-name">is_subform?</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000264-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000264-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 246</span>
246:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_subform?</span>(<span class="ruby-identifier">column</span>)
247:         <span class="ruby-identifier">column_renders_as</span>(<span class="ruby-identifier">column</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">:subform</span>
248:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000263" class="method-detail">
        <a name="M000263"></a>

        <div class="method-heading">
          <a href="#M000263" class="method-signature">
          <span class="method-name">is_subsection?</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000263-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000263-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 242</span>
242:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_subsection?</span>(<span class="ruby-identifier">column</span>)
243:         <span class="ruby-identifier">column_renders_as</span>(<span class="ruby-identifier">column</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">:subsection</span>
244:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000258" class="method-detail">
        <a name="M000258"></a>

        <div class="method-heading">
          <a href="#M000258" class="method-signature">
          <span class="method-name">override_form_field</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
the naming convention for overriding form fields with helpers
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000258-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000258-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 201</span>
201:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">override_form_field</span>(<span class="ruby-identifier">column</span>)
202:         <span class="ruby-node">&quot;#{column.name}_form_column&quot;</span>
203:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000257" class="method-detail">
        <a name="M000257"></a>

        <div class="method-heading">
          <a href="#M000257" class="method-signature">
          <span class="method-name">override_form_field?</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000257-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000257-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 196</span>
196:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">override_form_field?</span>(<span class="ruby-identifier">column</span>)
197:         <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">override_form_field</span>(<span class="ruby-identifier">column</span>))
198:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000256" class="method-detail">
        <a name="M000256"></a>

        <div class="method-heading">
          <a href="#M000256" class="method-signature">
          <span class="method-name">override_form_field_partial</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
the naming convention for overriding form fields with partials
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000256-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000256-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 192</span>
192:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">override_form_field_partial</span>(<span class="ruby-identifier">column</span>)
193:         <span class="ruby-node">&quot;#{column.name}_form_column&quot;</span>
194:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000255" class="method-detail">
        <a name="M000255"></a>

        <div class="method-heading">
          <a href="#M000255" class="method-signature">
          <span class="method-name">override_form_field_partial?</span><span class="method-args">(column)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Form column override signatures
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000255-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000255-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 186</span>
186:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">override_form_field_partial?</span>(<span class="ruby-identifier">column</span>)
187:         <span class="ruby-identifier">path</span>, <span class="ruby-identifier">partial_name</span> = <span class="ruby-identifier">partial_pieces</span>(<span class="ruby-identifier">override_form_field_partial</span>(<span class="ruby-identifier">column</span>))
188:         <span class="ruby-ivar">@finder</span>.<span class="ruby-identifier">file_exists?</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">path</span>, <span class="ruby-node">&quot;_#{partial_name}&quot;</span>)
189:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000260" class="method-detail">
        <a name="M000260"></a>

        <div class="method-heading">
          <a href="#M000260" class="method-signature">
          <span class="method-name">override_input</span><span class="method-args">(form_ui)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
the naming convention for overriding form input types with helpers
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000260-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000260-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 210</span>
210:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">override_input</span>(<span class="ruby-identifier">form_ui</span>)
211:         <span class="ruby-node">&quot;active_scaffold_input_#{form_ui}&quot;</span>
212:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000259" class="method-detail">
        <a name="M000259"></a>

        <div class="method-heading">
          <a href="#M000259" class="method-signature">
          <span class="method-name">override_input?</span><span class="method-args">(form_ui)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000259-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000259-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/helpers/form_column_helpers.rb, line 205</span>
205:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">override_input?</span>(<span class="ruby-identifier">form_ui</span>)
206:         <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">override_input</span>(<span class="ruby-identifier">form_ui</span>))
207:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>